package com.yyy.trans.entity;

import lombok.Data;
import lombok.Getter;


@Data
public class MyData {
    @Getter
    private static int counter = 0;

    private static final Object lock = new Object();

    public static int reset(){
        counter = 0;
        return counter;
    }

    public void wrong(){
        synchronized (lock){
            counter++;
        }
    }
}
